// Package _8_II_左旋转字符串 main
// @Title _8_II_左旋转字符串
// @Description
// @Author  == 琳琳也叫王木木 ==  2022-01-16 18:23
// @Create  2022-01-16 18:23
package main

import "fmt"

func reverseLeftWords(s string, n int) string {
	if len(s) == 0 {
		return ""
	}
	last := n
	if n > len(s) {
		last = n % len(s)
	}
	return s[last:] + s[:last]
}

func main() {
	s := "abcdefg"
	k := 2
	fmt.Println(reverseLeftWords(s, k))
}
